def letter_to_number(letter):
    """将字母转换为数字（a=0, b=1, ..., j=9, k=0, ...）"""
    letter = letter.lower()
    if letter.isalpha():
        return str((ord(letter) - ord('a')) % 10)  # 转为字符串
    return ""

def interactive_converter():
    """人机交互：输入字符串，输出连续数字串"""
    print("字母转数字工具（a=0, b=1, ..., j=9, k=0, ...）")
    print("输入 'exit' 退出程序")
    
    while True:
        user_input = input("\n请输入字符串: ").strip()
        if user_input.lower() == 'exit':
            print("程序已退出")
            break
        
        # 转换所有字母并拼接数字
        number_sequence = ''.join([letter_to_number(char) for char in user_input])
        
        if number_sequence:
            print("转换结果:", number_sequence)
        else:
            print("未检测到有效字母！")

# 启动交互
interactive_converter()